from server import my_celery
from .models import db, Message


@my_celery.task()
def add2(msg):
    message = Message(details=msg)
    db.session.add(message)
    db.session.commit()
    return "success"
